library(devtools)
## Loading required package: usethis
install_github("Shijia1997/ADMerge",upgrade = "never")
## Skipping install of 'ADMerge' from a github remote, the SHA1 (dcd59ef7) has not changed since last install.
##   Use `force = TRUE` to force installation
library(ADMerge)
library(tidyr)
data_path = "ADNI data"

scr_table = get_src_table(path = data_path, ID_usr_list = c("RID"),DATE_usr_list = c("VISDATE","EXAMDATE"))

print(scr_table)
## # A tibble: 10 × 9
##    file         VARS_in_file ID_in_file DATE_in_file ID_for_merge DATE_for_merge
##    <chr>        <chr>        <chr>      <chr>        <chr>        <chr>         
##  1 CDR_15Feb20… Phase; ID; … ID; PTID;… VISDATE; US… RID          VISDATE       
##  2 DXSUM_PDXCO… PHASE; PTID… PTID; RID… EXAMDATE; U… RID          EXAMDATE      
##  3 ITEM         RID; VISCOD… RID; ADAS… ADAS_ExamDa… RID          ADAS_ExamDate 
##  4 MOCA_15Feb2… Phase; ID; … ID; RID; … VISDATE; US… RID          VISDATE       
##  5 MRIMETA_15M… PHASE; FIEL… ID; RID; … USERDATE; U… RID          EXAMDATE      
##  6 PTDEMOG_24M… PHASE; PTID… PTID; RID… VISDATE; US… RID          VISDATE       
##  7 UCSFFSX51_A… RID; VISCOD… RID; LONI… EXAMDATE; R… RID          EXAMDATE      
##  8 UPENNBIOMK_… BATCH; PHAS… RID        EXAMDATE; R… RID          EXAMDATE      
##  9 UPENNBIOMKA… RID; VISCOD… RID        EXAMDATE; R… RID          EXAMDATE      
## 10 UPENNPLASMA… RID; VISCOD… RID        update_stamp RID          <NA>          
## # ℹ 3 more variables: longitudinal <lgl>, IS_overlap <lgl>, WINDOW <dbl>

Each file identified as longitudinal will be join with the their “ID_for_merge” as y-axis and “DATE_for_merge” as x-axis for visualization. The DATE_for_merge from different files are integrated to the same timeline

By pass the source table into the “plot.files” function, we are able to visualize the distribution.

The user are able to hang over their mouses to points in the plot to highlight the all the scatter belongs to that group (file) while the users can also use the dropdown bar to visualize each file indivudally

plot.files(path = data_path, dict_src = scr_table)